package com.queryBuilder.action;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

import com.queryBuilder.entity.User;

@Controller
@RequestMapping("/loginController")
public class LoginController {
	
	@RequestMapping("/login")
	public String login(User users,HttpServletRequest request){

		if(null != users){
			return "/ok";	
		}else{
			request.setAttribute("message", "�û�����������");
			return "/index";
		} 
	}
	@RequestMapping("/index")
	public String init(){
		return "/index";
	}

}
